<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script charset="utf-8" src="/editor/kindeditor-min.js"></script>
    <script charset="utf-8" src="/editor/lang/zh_CN.js"></script>
    <script>
        KindEditor.ready(function(K) {
            window.editor = K.create('#editor_id',{
                uploadJson : '/upload',
                        fileManagerJson : '/upload',
                        allowFileManager : true
            });
        });
    </script>
</head>
<body>
<div>
    <%if(d==0){%>
    <form action="/mycenter/addarticle" method="post" enctype="multipart/form-data">
        <p>文章标题：<input type="text" name="title" value=""></p>
        <p>文章关键字：<input type="text" name="key" value=""></p>
        <p>文章说明：<textarea name="desc"></textarea></p>
        <p>文章添加时间：<input type="text" name="date" value="<%=time%>" ></p>
        <p>文章缩略图：<input type="file" name="img" ></p>
        <p>文章浏览数：<input type="text" name="look" value="10"></p>
        <p>文章简介：<textarea  name="profile" ></textarea>*200字以内 </p>
        <p>所属栏目：<select name="column">


                <% columnlist.forEach(function(data){ %>
                <%if(data.length>1){%>
                <%for(var i=0;i<data.length;i++){%>
                <%if(i==0){%>
                <option  value="<%=data[i]._id%>"><%=data[i].name%></option>
                <%}else{%>
                <option  value="<%=data[i]._id%>">——<%=data[i].name%></option>
                <%}}%>
                <%}else{%>
                <option  value="<%=data._id%>"><%=data.name%></option>
                <%}%>
                <%})%>

            </select></p>
        <p>文章内容：<textarea id="editor_id" name="content" style="width:700px;height:400px;"></textarea> </p>
        <p><input type="submit" value="提交"> </p>
    </form>
    <%}else{%>
    <p>恭喜你，添加文章成功！</p>
    <%}%>
</div>
</body>
</html>